package com.way.designpatterncodepratice.proxy;

/**
 * @author liangliwei 80551025
 * @description 静态代理
 * @date 2020-06-19
 */
public class StaticProxy implements ITarget{

    private ITarget target;

    public StaticProxy(ITarget target) {
        this.target = target;
    }

    @Override
    public int method() {
        int result;
        System.out.println("静态代理开始");
        result = target.method();
        System.out.println("静态代理结束");
        return result;
    }
}








